package com.apop.accompanyH5.order.domain;

import com.apop.accompanyH5.order.enums.OrderStateEnum;
import com.apop.common.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tbl_order")
@ApiModel(value = "Order", description = "订单信息")
public class OrderDO extends BaseDO {

    @TableId(value = "id", type = IdType.AUTO) // 自增
    private Long id;
    // 下单账号
    private String account;
    // 订单编号
    private String code;

    private String demand;

    private String receiveAddress;

    private String contact;

    private Integer hospitalId;

    private String hospitalName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    private Integer stuffId;

    /**
     * 订单状态
     *
     * @see OrderStateEnum
     */
    private Integer status;

    private String stuffName;

}
